home *** CD-ROM | disk | FTP | other *** search
/ Scene Storm / Scene Storm - Volume 1.iso / coding / asm / utils / crossword / includes / my_exec.i < prev    next >
Encoding:
Text File  |  1980-01-04  |  7.3 KB  |  462 lines

  1. * This is my standard EXEC header file. It has been ripped off
  2. * from the Genam library files & altered to suit my own
  3. * purposes.
  4.  
  5.  
  6. ExecBase        equ    4
  7. NULL        equ    0
  8.  
  9. * defines library offsets and macros for calling exec library
  10. * from location execbase
  11.  
  12. * note: four of the Semaphore names changed
  13.  
  14. Supervisor    equ    -30
  15. ExitIntr        equ    -36
  16. Schedule        equ    -42
  17. Reschedule    equ    -48
  18. Switch        equ    -54
  19. Dispatch        equ    -60
  20. Exception    equ    -66
  21. InitCode        equ    -72
  22. InitStruct    equ    -78
  23. MakeLibrary    equ    -84
  24. MakeFunctions    equ    -90
  25. FindResident    equ    -96
  26. InitResident    equ    -102
  27. Alert        equ    -108
  28. Debug        equ    -114
  29. Disable        equ    -120
  30. Enable        equ    -126
  31. Forbid        equ    -132
  32. Permit        equ    -138
  33. SetSR        equ    -144
  34. SuperState    equ    -150
  35. UserState    equ    -156
  36. SetIntVector    equ    -162
  37. AddIntServer    equ    -168
  38. RemIntServer    equ    -174
  39. Cause        equ    -180
  40. Allocate        equ    -186
  41. Deallocate    equ    -192
  42. AllocMem        equ    -198
  43. AllocAbs        equ    -204
  44. FreeMem        equ    -210
  45. AvailMem        equ    -216
  46. AllocEntry    equ    -222
  47. FreeEntry    equ    -228
  48. Insert        equ    -234
  49. AddHead        equ    -240
  50. AddTail        equ    -246
  51. Remove        equ    -252
  52. RemHead        equ    -258
  53. RemTail        equ    -264
  54. Enqueue        equ    -270
  55. FindName        equ    -276
  56. AddTask        equ    -282
  57. RemTask        equ    -288
  58. FindTask        equ    -294
  59. SetTaskPri    equ    -300
  60. SetSignal    equ    -306
  61. SetExcept    equ    -312
  62. Wait        equ    -318
  63. Signal        equ    -324
  64. AllocSignal    equ    -330
  65. FreeSignal    equ    -336
  66. AllocTrap    equ    -342
  67. FreeTrap        equ    -348
  68. AddPort        equ    -354
  69. RemPort        equ    -360
  70. PutMsg        equ    -366
  71. GetMsg        equ    -372
  72. ReplyMsg        equ    -378
  73. WaitPort        equ    -384
  74. FindPort        equ    -390
  75. AddLibrary    equ    -396
  76. RemLibrary    equ    -402
  77. OldOpenLibrary    equ    -408
  78. CloseLibrary    equ    -414
  79. SetFunction    equ    -420
  80. SumLibrary    equ    -426
  81. AddDevice    equ    -432
  82. RemDevice    equ    -438
  83. OpenDevice    equ    -444
  84. CloseDevice    equ    -450
  85. DoIO        equ    -456
  86. SendIO        equ    -462
  87. CheckIO        equ    -468
  88. WaitIO        equ    -474
  89. AbortIO        equ    -480
  90. AddResource    equ    -486
  91. RemResource    equ    -492
  92. OpenResource    equ    -498
  93. RawIOInit    equ    -504
  94. RawMayGetChar    equ    -510
  95. RawPutChar    equ    -516
  96. RawDoFmt        equ    -522
  97. GetCC        equ    -528
  98. TypeOfMem    equ    -534
  99. Procure        equ    -540
  100. Vacate        equ    -546
  101. OpenLibrary    equ    -552
  102. * 1.2 added
  103. InitSemaphore    equ    -558
  104. ObtSemphore    equ    -564    was ObtainSemaphore    
  105. RelSemphore    equ    -570    was ReleaseSemaphore
  106. AttemptSemaphore    equ    -576
  107. ObtSemaphoreList    equ    -582    was Obtain etc
  108. RelSemaphoreList    equ    -588    was Release etc
  109. FindSemaphore    equ    -594
  110. AddSemaphore    equ    -600
  111. RemSemaphore    equ    -606
  112. SumKickData    equ    -612
  113. AddMemList    equ    -618
  114. CopyMem        equ    -624
  115. CopyMemQuick    equ    -630
  116.  
  117.  
  118. MEMF_CHIP    equ    2
  119. MEMF_FAST    equ    4
  120. MEMF_PUBLIC    equ    1
  121. MEMF_CLEAR    equ    $10000
  122. MEMF_LARGEST    equ    $20000
  123.  
  124.  
  125. PARALLEL_PRINTER    equ    $00
  126. SERIAL_PRINTER    equ    $01
  127.  
  128. BAUD_110        equ    $00
  129. BAUD_300        equ    $01
  130. BAUD_1200    equ    $02
  131. BAUD_2400    equ    $03
  132. BAUD_4800    equ    $04
  133. BAUD_9600    equ    $05
  134. BAUD_19200    equ    $06
  135. BAUD_MIDI    equ    $07
  136.  
  137. FANFOLD        equ    $00
  138. SINGLE        equ    $80
  139.  
  140. PICA        equ    $000
  141. ELITE        equ    $400
  142. FINE        equ    $800
  143.  
  144. DRAFT        equ    $000
  145. LETTER        equ    $100
  146.  
  147. SIX_LPI        equ    $000
  148. EIGHT_LPI    equ    $200
  149.  
  150. IMAGE_POSITIVE    equ    0
  151. IMAGE_NEGATIVE    equ    1
  152.  
  153. ASPECT_HORIZ    equ    0
  154. ASPECT_VERT    equ    1
  155.  
  156. SHADE_BW        equ    $00
  157. SHADE_GREYSCALE    equ    $01
  158. SHADE_COLOR    equ    $02
  159.  
  160. US_LETTER    equ    $00
  161. US_LEGAL        equ    $10
  162. N_TRACTOR    equ    $20
  163. W_TRACTOR    equ    $30
  164. CUSTOM        equ    $40
  165.  
  166. CUSTOM_NAME    equ    $00
  167. ALPHA_P_101    equ    $01
  168. BROTHER_15XL    equ    $02
  169. CBM_MPS1000    equ    $03
  170. DIAB_630        equ    $04
  171. DIAB_ADV_D25    equ    $05
  172. DIAB_C_150    equ    $06
  173. EPSON        equ    $07
  174. EPSON_JX_80    equ    $08
  175. OKIMATE_20    equ    $09
  176. QUME_LP_20    equ    $0A
  177. HP_LASERJET    equ    $0B
  178. HP_LASERJET_PLUS    equ    $0C
  179.  
  180.  
  181. CHECKWIDTH    equ    19
  182. COMMWIDTH    equ    27
  183. LOWCHECKWIDTH    equ    13
  184. LOWCOMMWIDTH    equ    16
  185.  
  186. ALERT_TYPE    equ    $80000000
  187. RECOVERY_ALERT    equ    $00000000
  188. DEADEND_ALERT    equ    $80000000
  189.  
  190. * this is the list of exec node types
  191.  
  192. NT_TASK        equ    1
  193. NT_INTERRUPT    equ    2
  194. NT_DEVICE    equ    3
  195. NT_MSGPORT    equ    4
  196. NT_MESSAGE    equ    5
  197. NT_FREEMSG    equ    6
  198. NT_REPLYMSG    equ    7
  199. NT_RESOURCE    equ    8
  200. NT_LIBRARY    equ    9
  201. NT_MEMORY    equ    10
  202. NT_SOFTINT    equ    11
  203. NT_FONT        equ    12
  204. NT_PROCESS    equ    13
  205. NT_SEMAPHORE    equ    14
  206.  
  207. * device definitions
  208.  
  209. DEV_BEGINIO    equ    -30
  210. DEV_ABORTIO    equ    -36
  211. IOB_QUICK    equ    0
  212. IOF_QUICK    equ    1
  213. CMD_INVALID    equ    0
  214. CMD_RESET    equ    1
  215. CMD_READ        equ    2
  216. CMD_WRITE    equ    3
  217. CMD_UPDATE    equ    4
  218. CMD_CLEAR    equ    5
  219. CMD_STOP        equ    6
  220. CMD_START    equ    7
  221. CMD_FLUSH    equ    8
  222. CMD_NONSTD    equ    9
  223.  
  224.  
  225. * node structure def
  226.  
  227.         rsreset
  228. ln_Succ        rs.l    1
  229. ln_Pred        rs.l    1
  230. ln_Type        rs.b    1
  231. ln_Pri        rs.b    1
  232. ln_Name        rs.l    1
  233.  
  234. ln_sizeof    rs.w    0
  235.  
  236.  
  237. * list strucutre def
  238.  
  239.         rsreset
  240. lh_Head        rs.l    1
  241. lh_Tail        rs.l    1
  242. lh_TailPred    rs.l    1
  243. lh_Type        rs.b    1
  244. lh_Pad        rs.b    1
  245.  
  246. lh_sizeof    rs.w    0
  247.  
  248.  
  249. * library structure
  250.  
  251.         rsreset
  252. lib_node        rs.b    ln_sizeof
  253. lib_flags    rs.b    1
  254. lib_pad        rs.b    1
  255. lib_negsize    rs.w    1
  256. lib_possize    rs.w    1
  257. lib_version    rs.w    1
  258. lib_revision    rs.w    1
  259. lib_idstring    rs.l    1
  260. lib_sum        rs.l    1
  261. lib_opencnt    rs.w    1
  262.  
  263. lib_sizeof    rs.w    0
  264.  
  265.  
  266. * this is the basic interrupt structure
  267.  
  268.  
  269.         rsreset
  270. is_node        rs.b    ln_sizeof
  271. is_data        rs.l    1
  272. is_code        rs.l    1
  273. is_sizeof    rs.w    0
  274.  
  275.  
  276. * this is the interrupt vector structure
  277.  
  278.         rsreset
  279. iv_data        rs.l    1
  280. iv_code        rs.l    1
  281. iv_node        rs.l    1
  282. iv_sizeof    rs.w    0
  283.  
  284.  
  285. * this is the interrupt server list structure
  286.  
  287.  
  288.         rsreset
  289. sl_list        rs.b    lh_sizeof
  290. sl_IntClr1    rs.w    1
  291. sl_IntSet    rs.w    1
  292. sl_IntClr2    rs.w    1
  293. sl_pad        rs.w    1
  294. sl_sizeof    rs.w    0
  295.  
  296.  
  297. * soft int list structure
  298.  
  299.  
  300.         rsreset
  301. sh_list        rs.b    lh_sizeof
  302. sh_pad        rs.w    1
  303. sh_sizeof    rs.w    0
  304.  
  305.  
  306. * here goes task structure definition
  307.  
  308.  
  309.         rsreset
  310. tc_node        rs.b    ln_sizeof
  311. tc_flags        rs.b    1
  312. tc_state        rs.b    1
  313. tc_IDnestcnt    rs.b    1
  314. tc_TDnestcnt    rs.b    1
  315. tc_sigalloc    rs.l    1
  316. tc_sigwait    rs.l    1
  317. tc_sigrecvd    rs.l    1
  318. tc_sigexecpt    rs.l    1
  319. tc_trapalloc    rs.w    1
  320. tc_trapable    rs.w    1
  321. tc_exceptdata    rs.l    1
  322. tc_exceptcode    rs.l    1
  323. tc_trapdata    rs.l    1
  324. tc_trapcode    rs.l    1
  325. tc_SPreg        rs.l    1
  326. tc_SPlower    rs.l    1
  327. tc_SPupper    rs.l    1
  328. tc_switch    rs.l    1
  329. tc_launch    rs.l    1
  330. tc_mementry    rs.b    lh_sizeof
  331. tc_userdata    rs.l    1
  332.  
  333. tc_sizeof    rs.w    0
  334.  
  335.  
  336. TC_INVALID    equ    0
  337. TC_ADDED        equ    1
  338. TC_RUNNING    equ    2
  339. TC_READY        equ    3
  340. TC_WAITING    equ    4
  341. TC_EXCEPTION    equ    5
  342. TC_REMOVED    equ    6
  343.  
  344.  
  345. * message node structure
  346.  
  347.         rsreset
  348. mn_Node        rs.b    ln_sizeof
  349. mn_ReplyPort    rs.l    1
  350. mn_Length    rs.w    1    ;size of message:appended to structure!
  351. mn_sizeof    rs.w    0
  352.  
  353.  
  354. * message port structure
  355.  
  356.  
  357.         rsreset
  358. mp_Node        rs.b    ln_sizeof
  359. mp_Flags        rs.b    1
  360. mp_SigBit    rs.b    1
  361. mp_SigTask    rs.l    1
  362. mp_MsgList    rs.b    lh_sizeof    ;NOT a pointer!!!
  363.  
  364. mp_sizeof    rs.w    0
  365.  
  366.  
  367. PA_SIGNAL    equ    0
  368. PA_SOFTINT    equ    1
  369. PA_IGNORE    equ    2
  370.  
  371.  
  372. * memlist structure
  373.  
  374.         rsreset
  375. ml_node        rs.b    ln_sizeof
  376. ml_numentries    rs.w    1
  377. ml_me        rs.l    1
  378.  
  379.  
  380. * EXECBASE STRUCTURE : Use with care!!!
  381.  
  382.         rsreset
  383.  
  384. LibNode        rs.b    lib_sizeof
  385. SoftVer        rs.w    1
  386. LowMemChkSum    rs.w    1
  387. ChkBase        rs.l    1
  388. ColdCapture    rs.l    1
  389. CoolCapture    rs.l    1
  390. WarmCapture    rs.l    1
  391. SysStkUpper    rs.l    1
  392. SysStkLower    rs.l    1
  393. MaxLocMem    rs.l    1
  394. DebugEntry    rs.l    1
  395. DebugData    rs.l    1
  396. AlertData    rs.l    1
  397. MaxExtMem    rs.l    1
  398. ChkSum        rs.w    1
  399. IntVects        rs.b    iv_sizeof*16
  400. ThisTask        rs.l    1
  401. IdleCount    rs.l    1
  402. DispCount    rs.l    1
  403. Quantum        rs.w    1
  404. Elapsed        rs.w    1
  405. SysFlags        rs.w    1
  406. IDNestCnt    rs.b    1
  407. TDNestCnt    rs.b    1
  408. AttnFlags    rs.w    1
  409. AttnResched    rs.w    1
  410. ResModules    rs.l    1
  411. TaskTrapCode    rs.l    1
  412. TaskExceptCode    rs.l    1
  413. TaskExitCode    rs.l    1
  414. TaskSigAlloc    rs.l    1
  415. TaskTrapAlloc    rs.w    1
  416. MemList        rs.b    lh_sizeof
  417. ResourceList    rs.b    lh_sizeof
  418. DeviceList    rs.b    lh_sizeof
  419. IntrList        rs.b    lh_sizeof
  420. LibList        rs.b    lh_sizeof
  421. PortList        rs.b    lh_sizeof
  422. TaskReady    rs.b    lh_sizeof
  423. TaskWait        rs.b    lh_sizeof
  424. SoftIntList    rs.b    80
  425. LastAlert    rs.l    4
  426. VBLFreq        rs.b    1
  427. PSUFreq        rs.b    1
  428. SemaphoreList    rs.b    lh_sizeof
  429. KickMemPtr    rs.l    1
  430. KickTagPtr    rs.l    1
  431. KickCheckSum    rs.l    1
  432. ExecBaseResvd    rs.b    10
  433. ExecBaseNewResvd    rs.b    20
  434.  
  435. execbase_sizeof    rs.w    0
  436.  
  437. AFB_68010    equ    0
  438. AFB_68020    equ    1
  439. AFB_68881    equ    4
  440. AFF_68010    equ    1<<0
  441. AFF_68020    equ    1<<1
  442. AFF_68881    equ    1<<4
  443.  
  444. AFB_RESERVED8    equ    8
  445. AFB_RESERVED9    equ    9
  446.  
  447.  
  448.  
  449. * This is my macro for calling an EXEC.LIBRARY function
  450.  
  451. CALLEXEC        macro    name    ;call an EXEC function
  452.  
  453.         move.l    a6,-(sp)
  454.         move.l    ExecBase,a6
  455.         jsr    \1(a6)
  456.         move.l    (sp)+,a6
  457.  
  458.         endm
  459.  
  460.  
  461.  
  462.